<template>
	<view class="money-content u-flex-column">
		<!-- 	<view class="" style="background-color: #fff;padding: 20rpx 10rpx;display: flex;background-color: #fd7400;width: 100%;">
			<u-search placeholder="" v-model="keyword" height="70" :showAction="false" searchIconSize="48"
				bgColor="#fff" @search="goSearch"></u-search>
			<u-icon name="list" size="48" color="#fff"></u-icon>
		</view> -->
		<!-- <view class="tabs">
			<u-tabs :current="tabIndex" :list="tabs" lineHeight="6rpx" lineColor="#fd7400"
				:inactiveStyle="{color: '#000'}" :activeStyle="{color: '#fd7400'}" @change="changeTab"></u-tabs>
		</view> -->
		<view class="nav-status text-orange">
			当前状态有{{count}}个报表
		</view>
		<scroll-view>
			<view class="card-list">
				<view class="card mt-5" v-for="item in fnanceorderdaolist" :key="item.id">
					<view class="top u-flex-between">
						<view class="left u-flex">
							<view class="text-info ">
								{{item.workNo}}
							</view>
						</view>
						<view class="cus-btn">
							{{item.moduleName}}
						</view>
					</view>
					<view class="center">
						<view class="title u-flex-between">
							<view class="title-left text-gray">
								{{item.receiptNo}}
							</view>
						</view>
						<view class="text">
							产品品牌:
							<span style="margin-left: 14rpx;">{{item.brands}}</span>
						</view>
						<view class="text ">
							产品型号:
							<span style="margin-left: 14rpx;">{{item.models }}</span>
						</view>
						<view class="text ">
							客户地址:
							<span style="margin-left: 14rpx;">{{item.customerAddress }}</span>
						</view>
						<view class="text  ">
							下单时间:
							<span style="margin-left: 14rpx;">{{item.createTime }}</span>
						</view>
						<view class="text">
							结算时间:
							<span style="margin-left: 14rpx;">{{item.finishTime }}</span>
						</view>
						<view class="text">
							
							配件费:
							<span style="margin-left: 14rpx;">{{item.spareFee}}</span>
						</view>
						<view class="text">
							合计:
							<span style="margin-left: 14rpx;">{{item.workFee}}</span>
						</view>
					</view>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabIndex: 0,
				count: '',
				params: {
					endTime: null,
					networkEmpId: "",
					networkId: "",
					pageNum: 1,
					pageSize: "10",
					search: "",
					searchType: "1",
					startTime: null,
					status: "",
				},
				custAccId: '',
				newParams: [],
				fnanceorderdaolist: [],
			};
		},
		onLoad() {
			this.custAccId = uni.getStorageSync('custAccid')
			this.getFnanceOrderDaoList()
		},
		// 下拉刷新
		onPullDownRefresh() {
			this.getPullRefresh()
		},
		methods: {
			// 下拉刷新请求数据
			getPullRefresh(){
				console.clear()
				
				this.getFnanceOrderDaoList()
				
			},
			async getFnanceOrderDaoList() {
				const res = await uni.$api.money.getFnanceOrderDaoList(this.custAccId, {
					...this.params,
				})
				this.fnanceorderdaolist = res.data
				this.count = res.count
				uni.stopPullDownRefresh()
			},
		},

	}
</script>

<style lang="scss">
	.money-content {
		// height: 100vh;
		background-color: $uni-bg-color-grey;

		.tabs {
			background-color: #fff;
			font-size: 28rpx;
			width: 100%;
		}

		.nav-status {
			height: 100rpx;
			line-height: 100rpx;
			text-align: center;
			font-size: 28rpx;
		}

		.card-list {
			background: $uni-bg-color-grey;
			padding: 0 20rpx;

			.card {
				padding: 28rpx 32rpx;
				background: #fff;
				border-radius: 10rpx;
				margin-bottom: 28rpx;

				.top {
					border-bottom: solid 1px #f5f5f5;
					padding-bottom: 10px;

					.left {
						.text-info {
							font-size: 28rpx;
							font-weight: 700;
						}
					}
				}

				.center {
					padding-top: 10px;
					padding-bottom: 10px;

					.title {
						.title-left {
							font-size: 28rpx;
						}

						.title-right {
							// font-size: 28rpx;
						}
					}

					.text {
						font-size: 28rpx;
						color: gray;
						white-space: nowrap;
						text-overflow: ellipsis;
						overflow: hidden;
					}
				}

				.down {
					border-top: solid 1px #f5f5f5;
					padding-top: 12px;
				}
			}
		}
	}
</style>